import { type ComponentConfigModel } from "@/components/formdesigner/utils";

export default {
  component: async () => await import("./index.vue"),
  groupName: "自定义",
  icon: "teenyicons:users-outline",
  defaultSchema: {
    label: "用户选择器",
    type: "test1",
    input: true,
    componentProps: {
      placement: "bottom-start",
      multiple: false,
      remoteUrl: "/user/getUserList",
    },
  },
  config: {
    attribute: [
      {
        label: "字段名",
        type: "input",
        field: "field",
      },
      {
        label: "标题",
        type: "input",
        field: "label",
      },
      {
        label: "数据源",
        type: "input",
        field: "componentProps.remoteUrl",
        componentProps: {
          placeholder: "请输入",
          defaultValue: "/user/getUserList",
        },
      },
      {
        label: "是否多选",
        type: "switch",
        field: "componentProps.multiple",
        componentProps: {
          defaultValue: false,
        },
      },
    ],
  },
} as ComponentConfigModel;
